#pragma once

#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <vector>
#include <iomanip>
#include <random>

struct Point {
    double x, y;
};

class Arc {
public:

    Arc(Point center, double radius,double start,double end) : center(center), radius(radius), startangle(start), endangle(end) {}

    void SetArc(double startAngle, double endAanle) {
        this->startangle = NormalizeAngle(startAngle);
        this->endangle = NormalizeAngle(endangle);
    }
    static bool FindArcIntersections(Arc& arc1, Arc& arc2, std::vector<Point>& intersections);

private:
    Point  center;
    double radius;
    double startangle;
    double endangle;

    double NormalizeAngle(double angle);
    bool IsPointInArc(Point p);
    static bool CirclesArcIntersect(Point C1, double r1, Point C2, double r2, std::vector<Point>& intersections);
};
